package com.codi.bus.core.service;

import com.codi.base.exception.BaseAppException;
import com.codi.bus.core.domain.FundOptional;
import com.codi.bus.core.domain.FundOptionalPortfolio;
import com.codi.bus.core.resultModel.BaseResult;
import com.codi.bus.core.vo.OptionalFundVo;

import java.util.List;

/**
 * Created by asus on 2017/12/6.
 * 自选收藏模块
 */
public interface OptionalService {

    /**
     * 添加组合自选
     * @param portfolioCode
     * @return
     */
    BaseResult addPortfolio(String portfolioCode, String portfolioName, Long userId);

    /**
     * 添加普通基金自选
     * @return
     */
    BaseResult addFund(OptionalFundVo fundOptionalVo, Long userId) throws BaseAppException;

    /**
     * 添加货币基金自选
     * @return
     */
    BaseResult addCurrency(OptionalFundVo fundOptionalVo, Long userId) throws BaseAppException;

    /**
     * 查询组合自选
     * @param userId
     * @return
     */
    BaseResult queryPortfolio(Long userId);

    /**
     * 查询普通基金自选
     * @param userId
     * @return
     */
    BaseResult queryFund(Long userId);

    /**
     * 查询货币基金自选
     * @param userId
     * @return
     */
    BaseResult queryCurrency(Long userId);

    /**
     * 对组合自选进行排序和删除操作
     * @param portfolioOptional
     * @param userId
     * @return
     */
    BaseResult orderPortfolio(String portfolioOptional, Long userId);

    /**
     * 对基金自选进行排序和删除操作
     * @param fundOptional
     * @param userId
     * @param isCurrency
     * @return
     */
    BaseResult orderFund(String fundOptional, Long userId, Boolean isCurrency);

    /**
     * 展示组合是否已添加自选
     * @param portfolioCode
     * @param userId
     * @return
     */
    BaseResult isAddPortfolio(String portfolioCode, Long userId);

    /**
     * 展示基金是否已添加自选
     * @param userId
     * @return
     */
    BaseResult isAddFund(String fundCode, Long userId);

    BaseResult deletePortfolio(String portfolioCode, Long userId);

    BaseResult deleteFund(String fundCode, Long userId, int fundTypeCode);

    void updateFundOptional() throws BaseAppException;
}
